﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Contracts;

namespace Radar {

    public class Event : MarshalByRefObject, IEvent {

        int _id;
        readonly float _speed;
        readonly byte[] _picture;
        readonly string _plate;
        readonly DateTime _instant;

        public Event(float speed, byte[] picture, string plate) {
            _speed = speed;
            _picture = picture;
            _plate = plate;
            _instant = DateTime.Now;
        }

        public int GetId() { return _id; }
        public void SetId(int id) { _id = id; }
        public DateTime GetInstant() { return _instant; }
        public float GetSpeed() { return _speed; }
        public byte[] GetPicture() { return _picture; }
        public string GetPlate() { return _plate; }

        public override string ToString() {
            return "Id: " + _id + " | Date: " + _instant + " | Speed: " + _speed + " | Plate: " + _plate;
        }


    }
}
